/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entities;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Cristian
 */
@Entity
@Table(name = "pyfntbejegasto")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Pyfntbejegasto.findAll", query = "SELECT p FROM Pyfntbejegasto p"),
    @NamedQuery(name = "Pyfntbejegasto.findByPyfntbejegastoid", query = "SELECT p FROM Pyfntbejegasto p WHERE p.pyfntbejegastoid = :pyfntbejegastoid"),
    @NamedQuery(name = "Pyfntbejegasto.findByAsignado", query = "SELECT p FROM Pyfntbejegasto p WHERE p.asignado = :asignado"),
    @NamedQuery(name = "Pyfntbejegasto.findByModificado", query = "SELECT p FROM Pyfntbejegasto p WHERE p.modificado = :modificado"),
    @NamedQuery(name = "Pyfntbejegasto.findByVigente", query = "SELECT p FROM Pyfntbejegasto p WHERE p.vigente = :vigente"),
    @NamedQuery(name = "Pyfntbejegasto.findByMontocertif", query = "SELECT p FROM Pyfntbejegasto p WHERE p.montocertif = :montocertif"),
    @NamedQuery(name = "Pyfntbejegasto.findByComprometido", query = "SELECT p FROM Pyfntbejegasto p WHERE p.comprometido = :comprometido"),
    @NamedQuery(name = "Pyfntbejegasto.findByDevengado", query = "SELECT p FROM Pyfntbejegasto p WHERE p.devengado = :devengado"),
    @NamedQuery(name = "Pyfntbejegasto.findByPagado", query = "SELECT p FROM Pyfntbejegasto p WHERE p.pagado = :pagado"),
    @NamedQuery(name = "Pyfntbejegasto.findByFechacorte", query = "SELECT p FROM Pyfntbejegasto p WHERE p.fechacorte = :fechacorte"),
    @NamedQuery(name = "Pyfntbejegasto.findByObservaciones", query = "SELECT p FROM Pyfntbejegasto p WHERE p.observaciones = :observaciones")})
public class Pyfntbejegasto implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "pyfntbejegastoid")
    private Integer pyfntbejegastoid;
    @Basic(optional = false)
    @NotNull
    @Column(name = "asignado")
    private double asignado;
    @Basic(optional = false)
    @NotNull
    @Column(name = "modificado")
    private double modificado;
    @Basic(optional = false)
    @NotNull
    @Column(name = "vigente")
    private double vigente;
    @Basic(optional = false)
    @NotNull
    @Column(name = "montocertif")
    private double montocertif;
    @Basic(optional = false)
    @NotNull
    @Column(name = "comprometido")
    private double comprometido;
    @Basic(optional = false)
    @NotNull
    @Column(name = "devengado")
    private double devengado;
    @Basic(optional = false)
    @NotNull
    @Column(name = "pagado")
    private double pagado;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fechacorte")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechacorte;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 2147483647)
    @Column(name = "observaciones")
    private String observaciones;
    @JoinColumn(name = "pyfntbpoaprogid", referencedColumnName = "pyfntbpoaprogid")
    @ManyToOne(optional = false)
    private Pyfntbpoaprog pyfntbpoaprogid;
    @JoinColumn(name = "pyfntbpartidaid", referencedColumnName = "pyfntbpartidaid")
    @ManyToOne(optional = false)
    private Pyfntbpartida pyfntbpartidaid;

    public Pyfntbejegasto() {
    }

    public Pyfntbejegasto(Integer pyfntbejegastoid) {
        this.pyfntbejegastoid = pyfntbejegastoid;
    }

    public Pyfntbejegasto(Integer pyfntbejegastoid, double asignado, double modificado, double vigente, double montocertif, double comprometido, double devengado, double pagado, Date fechacorte, String observaciones) {
        this.pyfntbejegastoid = pyfntbejegastoid;
        this.asignado = asignado;
        this.modificado = modificado;
        this.vigente = vigente;
        this.montocertif = montocertif;
        this.comprometido = comprometido;
        this.devengado = devengado;
        this.pagado = pagado;
        this.fechacorte = fechacorte;
        this.observaciones = observaciones;
    }

    public Integer getPyfntbejegastoid() {
        return pyfntbejegastoid;
    }

    public void setPyfntbejegastoid(Integer pyfntbejegastoid) {
        this.pyfntbejegastoid = pyfntbejegastoid;
    }

    public double getAsignado() {
        return asignado;
    }

    public void setAsignado(double asignado) {
        this.asignado = asignado;
    }

    public double getModificado() {
        return modificado;
    }

    public void setModificado(double modificado) {
        this.modificado = modificado;
    }

    public double getVigente() {
        return vigente;
    }

    public void setVigente(double vigente) {
        this.vigente = vigente;
    }

    public double getMontocertif() {
        return montocertif;
    }

    public void setMontocertif(double montocertif) {
        this.montocertif = montocertif;
    }

    public double getComprometido() {
        return comprometido;
    }

    public void setComprometido(double comprometido) {
        this.comprometido = comprometido;
    }

    public double getDevengado() {
        return devengado;
    }

    public void setDevengado(double devengado) {
        this.devengado = devengado;
    }

    public double getPagado() {
        return pagado;
    }

    public void setPagado(double pagado) {
        this.pagado = pagado;
    }

    public Date getFechacorte() {
        return fechacorte;
    }

    public void setFechacorte(Date fechacorte) {
        this.fechacorte = fechacorte;
    }

    public String getObservaciones() {
        return observaciones;
    }

    public void setObservaciones(String observaciones) {
        this.observaciones = observaciones;
    }

    public Pyfntbpoaprog getPyfntbpoaprogid() {
        return pyfntbpoaprogid;
    }

    public void setPyfntbpoaprogid(Pyfntbpoaprog pyfntbpoaprogid) {
        this.pyfntbpoaprogid = pyfntbpoaprogid;
    }

    public Pyfntbpartida getPyfntbpartidaid() {
        return pyfntbpartidaid;
    }

    public void setPyfntbpartidaid(Pyfntbpartida pyfntbpartidaid) {
        this.pyfntbpartidaid = pyfntbpartidaid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (pyfntbejegastoid != null ? pyfntbejegastoid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Pyfntbejegasto)) {
            return false;
        }
        Pyfntbejegasto other = (Pyfntbejegasto) object;
        if ((this.pyfntbejegastoid == null && other.pyfntbejegastoid != null) || (this.pyfntbejegastoid != null && !this.pyfntbejegastoid.equals(other.pyfntbejegastoid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.Pyfntbejegasto[ pyfntbejegastoid=" + pyfntbejegastoid + " ]";
    }
    
}
